#ifndef     __SENSOR_H
#define     __SENSOR_H

#include "../utils/object.h"
#include "../utils/nocopyable.h"
#include "../utils/error.h"

namespace driver {

class Sensor : private utils::NoCopyable {

public:
    Sensor();

    void read_all_temp();

  //  inline bool is_all_ok() { return m_water_status.is_ok() && m_steam_status.is_ok(); }

 //   inline bool is_water_ok() { return m_water_status.is_ok(); }
    inline bool is_steam_ok() { return m_steam_status.is_ok(); }

 //   inline int16_t water_value() { return m_water_temp; };
    inline int16_t steam_value() { return m_steam_temp; }

    static bool is_leak();

    static bool is_steam_high();
    static bool is_steam_low();

    static uint16_t flow_count();
    static void flow_reset();
    static uint16_t flow_volume();

private:
  //  int16_t m_water_temp;
    int16_t m_steam_temp;
 //   utils::Error m_water_status;
    utils::Error m_steam_status;
};

inline utils::Object<Sensor> sensor;

}



#endif
